package com.winit.openapi.oauth.dao;

import org.apache.ibatis.annotations.Param;

import com.winit.common.orm.mybatis.MyBatisPageRepo;
import com.winit.common.orm.mybatis.MyBatisRepo;
import com.winit.openapi.oauth.entity.APIDeveloperEntity;

@MyBatisRepo
public interface APIDeveloperDao extends MyBatisPageRepo<APIDeveloperEntity, Long> {

    int insertDeveloper(APIDeveloperEntity entity);

    APIDeveloperEntity selectById(Long developerId);

    APIDeveloperEntity selectByAccount(String developerAccount);

    void updateDeveloper(APIDeveloperEntity entity);

    APIDeveloperEntity login(@Param("developerAccount") String developerAccount, @Param("password") String password);

    APIDeveloperEntity loginByWinitAccount(Long winitUserId);

    APIDeveloperEntity find(APIDeveloperEntity entity);

}
